package morphism;

public class Morphism {
    public static void main(String[] args) {
        Person p = new Person("p", 16);
        Student s = new Student("s", 18, "software");
        Teacher t = new Teacher("t", 28, "scct");

//        System.out.println(p);
//        System.out.println(s);
//        System.out.println(t);


//        p = s;
//        System.out.println(p);
        p = t;
        System.out.println(p);
//        t.getSchool();
//        p.getSchool();

//        Teacher teacher = (Teacher)p;
//        teacher.getSchool();
        ((Teacher)p).getSchool();
//        s = t;
//        t = s;

    }
}
